If it's gonna take a while to start up our Swing app, then we probably wanna display a splash screen. 

It's easy with Java6 - just add a <tt>-splash</tt> command-line option. 
<a href="https://code.google.com/p/vellum/"><div style="border-bottom: solid 1px; background-color: yellow;"><img border=0 src="http://weblogs.java.net/blog/evanx/archive/kcoloredit.png" width="32" height="32" align="left" hspace="8"/><b>Splash Screen, a waiting game:</b> <i>A part of "Gooey Beans, a trilogy in 42 parts"</i></div></a>
<pre>
public class SplashTest {
    static Logger logger = Logger.getLogger(SplashTest.class.getSimpleName());
    final SplashScreen splash = SplashScreen.getSplashScreen();
    Rectangle splashBounds;
    Graphics2D splashGraphics;
    
    protected void initSplash() throws Exception {
        if (splash == null) {
            throw new Exception("no splash image specified eg. -splash:mysplash.png");
        }
        splashBounds = splash.getBounds();
        splashGraphics = (Graphics2D) splash.createGraphics();
        ...
    }
    
    protected void updateSplash(String status, int progress) {
        if (splash == null) return;
        drawSplash(splashGraphics, status, progress);
        splash.update();
    }
    ...
} 
</pre>
where in <tt>drawSplash()</tt> we draw a progress bar ourselves over the splash image using the <tt>Graphics2D</tt> instance.

<h2>Resources</h2>

https://code.google.com/p/vellum/ - where i will collate these articles and their code.

